package com.ruoyi.basicInfo.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.basicInfo.mapper.UnitMapper;
import com.ruoyi.basicInfo.domain.Unit;
import com.ruoyi.basicInfo.service.IUnitService;

import javax.annotation.Resource;

/**
 * 煤矿外购Service业务层处理
 * 
 * @author zbw
 * @date 2022-07-16
 */
@Service
public class UnitServiceImpl implements IUnitService 
{
    @Resource
    private UnitMapper unitMapper;

    /**
     * 查询煤矿外购
     * 
     * @param unitId 煤矿外购主键
     * @return 煤矿外购
     */
    @Override
    public Unit selectUnitByUnitId(String unitId)
    {
        return unitMapper.selectUnitByUnitId(unitId);
    }

    /**
     * 查询煤矿外购列表
     * 
     * @param unit 煤矿外购
     * @return 煤矿外购
     */
    @Override
    public List<Unit> selectUnitList(Unit unit)
    {
        return unitMapper.selectUnitList(unit);
    }

    /**
     * 新增煤矿外购
     * 
     * @param unit 煤矿外购
     * @return 结果
     */
    @Override
    public int insertUnit(Unit unit)
    {
        return unitMapper.insertUnit(unit);
    }

    /**
     * 修改煤矿外购
     * 
     * @param unit 煤矿外购
     * @return 结果
     */
    @Override
    public int updateUnit(Unit unit)
    {
        return unitMapper.updateUnit(unit);
    }

    /**
     * 批量删除煤矿外购
     * 
     * @param unitIds 需要删除的煤矿外购主键
     * @return 结果
     */
    @Override
    public int deleteUnitByUnitIds(String[] unitIds)
    {
        return unitMapper.deleteUnitByUnitIds(unitIds);
    }

    /**
     * 删除煤矿外购信息
     * 
     * @param unitId 煤矿外购主键
     * @return 结果
     */
    @Override
    public int deleteUnitByUnitId(String unitId)
    {
        return unitMapper.deleteUnitByUnitId(unitId);
    }
}
